package com.mzj.saas.commons.enums;

/**
 * 智能锁事件枚举
 * @author hp
 *
 */
public enum LockEventTypeEnum {
	
	
	/**
	 * 锁离线事件
	 */
	OFFLINE("lockOfflineCallBack"),
	/**
	 * 锁开门事件
	 */
	OPEN_RECORD("openRecordCallBack"),
	/**
	 * 锁低电量事件
	 */
	LOW_BATTER("lowBatteryCallBack"),
	/**
	 * 其它
	 */
	OTHER("other");
	
	
	private String eventType;

	LockEventTypeEnum(String eventType) {
		this.eventType = eventType;
	}

	public String getEventType() {
		return eventType;
	}

	public static LockEventTypeEnum getLockType(String type) {
        for(LockEventTypeEnum s : values()) { 
            if(s.eventType.equals(type)) {
            	return s;
            }
        }
        return LockEventTypeEnum.OTHER;
    }
	
}
